package cn.cdeden.knowledge.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
@AllArgsConstructor
public enum TeamParamEnum {
    //查看、预览权限
    CHECK("check","预览权限"),
    //添加、上传权限
    ADD("add","上传权限"),
    //修改、编辑权限
    UPDATE("update","编辑权限"),
    //复制权限
    COPY("copy","复制权限"),
    //移动权限
    MOVE("move","移动权限"),
    //删除权限
    DELETE("delete","删除权限"),
    //下载权限
    DOWNLOAD("download","下载权限"),
    //分配权限
    JURISDICTION("jurisdiction","分配权限"),
    //分发同事
    DISTRIBUTE("distribute","分发同事"),
    //分发同事
    SHARE("share","分享"),
    //回收站
    RECYCLE("recycle","回收站"),
    //使用标签
    LABEL("label","使用标签"),
    //控制模板
    TEMPLATE("template","控制模板"),
    //文件打印
    PRINT("print","文件打印"),
    //提交企业库
    COMMIT_ENTERPRISE("commitEnterprise","提交企业库"),
    ;

    private final String param;
    private final String name;

    public static List<EnumInfo> toEnumInfoList() {
        List<EnumInfo> infoList = new ArrayList<>();
        for (TeamParamEnum permission : TeamParamEnum.values()) {
            infoList.add(new EnumInfo(permission.getParam(), permission.getName()));
        }
        return infoList;
    }

}
